
<%@page import="com.test.enity.Employee"%>
<%@page import="java.util.List"%>
<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>员工信息列表</title>
</head>
<body>
   
   <table border="1px">
      <tr>
        
         <th>员工姓名</th>
         <th>员工性别</th>
         <th>员工年龄</th>
         <th>所属部门</th>
         <th>所在职务</th>
         <th>工龄</th>
         <th>修改操作</th>
         <th>删除操作</th>
      </tr>
   
   <%
      List<Employee> employees=(List<Employee>)request.getAttribute("employees");
      for(Employee employee:employees){
      %>
    	  <tr>
    	   
    	    <td><%=employee.getName() %></td>
    	    <td><%=employee.getSex() %></td>
    	    <td><%=employee.getAge() %></td>
    	    <td><%=employee.getDapartment() %></td>
    	    <td><%=employee.getType() %></td>
    	    <td><%=employee.getYear() %></td>
    	    <td><a href="QueryEmployeeByIdServlet?id=<%=employee.getId()%>">修改</a></td>
    	    <td><a href="DeleteEmployeeServlet?id=<%=employee.getId() %>">删除</a></td>
    	  </tr>   	  
    	  
     <% }%>
   
     <tr>
       <td><a href="addEmployee.jsp">新增员工信息</a></td>
     </tr>
      
   </table>
</body>
</html>